<?php
//======================================================================================
//
// Function: Run a SQL statement against some database
//
// NOTE: config.php must have been include before you include this!
//
// Programmer: JKJ
// Date : 2022-01-06
//
// ------------------------------------------------------------------------------------------
// One year since the crazy fvcking Trump supporters tried to overcome US democracy.
// FVCK TRUMP AND ALL HIS SUPPORTERS AND DF AND NY BOGERLIGE AND ALL RIGHT WING SHITHEADS!!!!
// ------------------------------------------------------------------------------------------
//
// Copyright Reeft A/S (c) - 2021
//======================================================================================
if ( $DFT_DATABASE_TO_USE == '*MYSQL') {
$result = $file_db->prepare( $sql );
$result->execute();
$current_elm = $result->rowCount();
@$last_id = $file_db->lastInsertId();
// Fetch the next row of a result set as an associative array
try {
$data = $result->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
//echo "Connection failed: " . $e->getMessage();
}
}
else if ( $DFT_DATABASE_TO_USE == '*MARIA_DB') {
$result = $file_db->prepare( $sql );
$result->execute();
$current_elm = $result->rowCount();
@$last_id = $file_db->lastInsertId();
// Fetch the next row of a result set as an associative array
try {
$data = $result->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
//echo "Connection failed: " . $e->getMessage();
}
}
else
{
$result = $file_db->prepare( $sql );
$result->execute();
$current_elm = $result->rowCount();
@$last_id = $file_db->lastInsertId();
// Fetch the next row of a result set as an associative array
$data = $result->fetchAll( PDO::FETCH_ASSOC );
}
?>